package cn.teceasy.quartz.event;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import cn.teceasy.quartz.service.IScheduleJobService;
import lombok.extern.slf4j.Slf4j;

/**
 * 
 * @author Administrator
 *
 */
@Component
@Slf4j
public class ScheduleJobInit {

    /** 定时任务service */
    @Autowired
    private IScheduleJobService scheduleJobService;

    /**
     * 项目启动时初始化
     */
    @PostConstruct
    public void init() {

        if (log.isInfoEnabled()) {
        	log.info("init");
        }

        scheduleJobService.initScheduleJob();

        if (log.isInfoEnabled()) {
        	log.info("end");
        }
    }

}
